package main

import (
	"flag"
	"fmt"
	"log"

	"gitee.com/dark.H/go-utils/s"
)

func main() {
	line := ""
	line2 := ""
	line3 := false
	flag.StringVar(&line, "s", "one", "helo its")
	flag.StringVar(&line2, "s2", "tw", "helo its")
	flag.BoolVar(&line3, "s3", false, "helo its")
	s.Args()
	fmt.Println("s2=", line2)

	fmt.Println("s3=", line3)

	fmt.Println("s=", line)

	c2 := s.Dict[s.Str, any]{
		"hello":    "asfasgadg",
		"we":       "adsgadsgdddd",
		"ssss":     "can you see",
		"this-num": 12521,
		"sub": s.Dict[s.Str, any]{
			"sub-key": "key in second",
			"sub-num": 2,
		},
	}
	res, err := c2.AsStr(`{key} = {val} `, "\n", "[{key}]\n")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println("\n\n[base]\n" + res)

	d := s.FromIni(s.Str("@./test.ini").ParseFileContent())
	fmt.Println(d.Json())
}
